package exception.runtimeexception;

/**
 * 演示try...catch中的finally子句
 * finally中的语句始终会被执行
 *
 * finally这个子句在IO流中进行讲解
 *
 */
public class FinallyDemo {
    public static void main(String[] args) {

        int a = 23;
        int b = 0;


        try {
            //输出a/b
            System.out.println(a / b);
        }catch (ArithmeticException e ){
            System.out.println("程序出错");
        }finally {
            System.out.println("最终输出执行语句");
        }
        //



        System.out.println("程序结束");
    }
}
